import React from 'react' 


export default class Robot extends React.Component {
    constructor(props) {
        super(props)
        this.state = {
        
        }
    }

    // react第一个生命周期   
    // mounted
    componentDidMount(){

    }


    render () {
        return (
            <div style={{border:'1px solid red',backgroundColor:"skyblue"}}>
                <img 
                    key={this.props.id}
                    alt='robot' 
                    src={`https://robohash.org/${this.props.id}`}
                  
                /> 
                <h2>{this.props.name}</h2>
                <h2>{this.props.email}</h2>
            </div>
        )
    }
}


